<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增店铺')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-shop-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商铺名称：</label>
                <div class="col-sm-8">
                    <input name="name" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商铺类型的id：</label>
                <div class="col-sm-8">
                    <input name="typeId" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">商铺图片，多个图片以：</label>
                <div class="col-sm-8">
                    <textarea name="images" class="form-control" required></textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商圈，例如陆家嘴：</label>
                <div class="col-sm-8">
                    <input name="area" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">地址：</label>
                <div class="col-sm-8">
                    <input name="address" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">经度：</label>
                <div class="col-sm-8">
                    <input name="x" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">维度：</label>
                <div class="col-sm-8">
                    <input name="y" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">均价，取整数：</label>
                <div class="col-sm-8">
                    <input name="avgPrice" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">销量：</label>
                <div class="col-sm-8">
                    <input name="sold" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">评论数量：</label>
                <div class="col-sm-8">
                    <input name="comments" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">评分，1~5分，乘10保存，避免小数：</label>
                <div class="col-sm-8">
                    <input name="score" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">营业时间，例如 10:00-22:00：</label>
                <div class="col-sm-8">
                    <input name="openHours" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/shop"
        $("#form-shop-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-shop-add').serialize());
            }
        }
    </script>
</body>
</html>